﻿package modelDB;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "Member")
public class Member extends Customer {

	@Column(unique = true, nullable = false)
	protected String loginID;

	@Column(nullable = false)
	protected String name;
	
	@Column(unique=true)
	protected String phone;
	protected Date brithday;

	private int pointAccumulated;
	private double discountRate;
	private Date joinDate;
	private int level;

	public Member() {
	}

	public Member(String loginID, String name, String phone, Date brithday,
			Date joinDate) {
		this.loginID = loginID;
		this.name = name;
		this.phone = phone;
		this.brithday = brithday;
		this.joinDate = joinDate;
	}

	public String getLoginID() {
		return loginID;
	}

	public void setLoginID(String loginID) {
		this.loginID = loginID;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public Date getBrithday() {
		return brithday;
	}

	public void setBrithday(Date brithday) {
		this.brithday = brithday;
	}

	public int getPointAccumulated() {
		return pointAccumulated;
	}

	public void setPointAccumulated(int pointAccumulated) {
		this.pointAccumulated = pointAccumulated;
	}

	public double getDiscountRate() {
		return discountRate;
	}

	public void setDiscountRate(double discountRate) {
		this.discountRate = discountRate;
	}

	public Date getJoinDate() {
		return joinDate;
	}

	public void setJoinDate(Date joinDate) {
		this.joinDate = joinDate;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}

	public void signOut() {

	}

	public void viewPersonalInfo() {

	}

	@Override
	public String toString() {
		return "Member [loginID=" + loginID + ", name=" + name + ", phone="
				+ phone + ", brithday=" + brithday + ", pointAccumulated="
				+ pointAccumulated + ", discountRate=" + discountRate
				+ ", joinDate=" + joinDate + ", level=" + level + "]";
	}
	
}
